//
//  RCPointAnnotation.m
//  testmap
//
//  Created by bilinguis on 13-7-15.
//  Copyright (c) 2013年 __MyCompanyName__. All rights reserved.
//

#import "RCPointAnnotation.h"

@interface RCPointAnnotation ()
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *address;
@property (nonatomic, assign) CLLocationCoordinate2D theCoordinate;
@end

@implementation RCPointAnnotation

@synthesize name = _name;
@synthesize address = _address;
@synthesize theCoordinate = _theCoordinate;

- (id)initWithName:(NSString*)name_param address:(NSString*)address_param coordinate:(CLLocationCoordinate2D)coordinate {
    if ((self = [super init])) {
        if ([name_param isKindOfClass:[NSString class]]) {
            self.name = name_param;
        } else {
            self.name = @"Unknown charge";
        }
        self.address = address_param;
        self.theCoordinate = coordinate;
    }
    return self;
}

- (NSString *)title {
    return _name;
}

- (NSString *)subtitle {
    return _address;
}

- (CLLocationCoordinate2D)coordinate {
    return _theCoordinate;
}

@end
